#include<iostream>
#include<functional>
using namespace std;

void f1(int n1, int n2)
{
	cout<< "In f1, [n1, n2] = [" << n1 << ", " << n2 << "]" <<endl;
}

void f2(int &n1, int &n2)
{
	cout<< "In f2, [n1, n2] = [" << n1 << ", " << n2 << "]" <<endl;
}


int main(void)
{
	int x = 10, y = 20;
	auto f = bind(f1, x, y);
	auto g = bind(f2, x, y);
	auto h = bind(f2, x, std::ref(y));
	
	x++;
	y++;
	f();
	g();
	h();
	
	return 0;
}
